/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


var myDate;
var myHeader;

function actualizaVariableGlobal(variable,tDate){

  myHeader=variable;
  myDate=tDate;
}

  function actualiza(rId,cInd,nValue) {
    initGrid();
  }

  function initGrid(idProyecto){
    //idGrid igual a idProyecto
	mygrid = new dhtmlXGridObject("grid"+idProyecto);
        mygrid.setImagePath("/imgs/");
        mygrid.setHeader(myHeader);
        mygrid.setInitWidths("130,50,90,90,90,90,90,90,90,90");
        mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left");
        mygrid.setColTypes("ro,ed,coro,ed,ed,ed,ed,ed,ed,ed");
        mygrid.setSkin("dhx_skyblue");
        mygrid.setColSorting("str,str,str,str,str,str,str,str,str,str");
        mygrid.attachEvent("onEnter", actualiza );
        mygrid.init();
        mygrid.loadXML("/week_time_sheets/show_all/"+idProyecto+".xml?start_date="+myDate);
        myDataProcessor = new dataProcessor("/week_time_sheets/up/"+idProyecto+".xml");
        myDataProcessor.setUpdateMode("cell");
        myDataProcessor.init(mygrid);
  }